A Tucson man has been sentenced to more than 30 years in prison for the murder of a 28-year-old man in west Phoenix in 2022.