A former South Carolina pastor has been sentenced to 40 years in prison after being convicted of sexually assaulting his two daughters.