Murder by the state is a crime against humanity. There is no justification for it under any circumstance.
Once we finally end it, it's time to start working on ending life without parole as well, it is also inhumane. Let's use Norway's system as a model, with a maximum 21 year sentence, with extensions available at the end of that for the most serious crimes only if the person can be proven to still be a danger to society, and a prison system geared toward rehabilitation, education, and treating prisoners like humans.
And let's stop putting insane people in prison. The "not guilty by reason of insanity" verdict should become much easier to get, it's obviously appropriate for over 50% of violent crimes, and should result in people being sent to secure hospitals for treatment and to be released when they're well instead of prison. It's bad for them, it's bad for the other prisoners, and since nearly all prisoners will eventually be released, it's bad for society since they're now released without treatment, resulting in more crime.