Man gets 40 years for child sex assault