A former Administration Police (AP) officer has been sentenced to 40 years in prison after being found guilty of murdering his colleague.