Court upholds 40-year sentence against St Catherine man