The best exercise to restore that range of motion is the press. If your lockout is correct and can be achieved with weight and without pain, I cannot imagine any scenario where this would cause an injury.
Your description of your lockout is insufficient to determine if your lockout is correct. Post a video. Maybe post a video of yourself without weight, for that matter, since this is a strange problem to be encountering.