If the lethal injection isn't done correctly then yes it can be painful when they inject the last drug that stops the heart.
The last drug has given the prisoners a burning sensation in their heart. The last drug gives the prisoner a heart attack.
Most prisoners who have been executed by lethal injection have died within 10 minutes but some can take as long as 2 hours to die.