A King of Prussia man, a retired special education teacher who once worked at Lower Merion and Harriton high schools and who federal authorities said traveled to the Philippines to have sex with minors, was sentenced to more than three decades in prison.