Step one -- press your caps lock one time. :grin:
Seriously, most hammers can safely be cold bent once.
What type of lock is this? The metal varies and some members might be able to assist you with info on whether this is a good choice.
You should study the bend carefully, place it into a padded vise and find a reference point to know when you get it where it needs to be. Is this a twist situation or a straight bend. I have bent two and twisted one.
I have used a crescent wrench padded with leather to avoid marring the hammer. (That would be an adjustable spanner for our friends from other countries who may not spaek Americanese) Oddly enough, I find that the ring at the end that is used to hang the wrench up is far more useful for bending a hammer than the jaws are unless you are also making a twist. In that case, a vise grip or the jaws might be a better choice. Study and experiment with little force to get comfortable before applying much force.
Then do it once and do it right.
This has worked for me on 3 rifles and I have seen it done on a few more.
Good luck.
CS