A 50-year-old former state prison guard has been sentenced to more than 40 years behind bars for sexually abusing two young girls at his home in Oneida County.