Mexican former security chief sentenced to more than 38 years in prison