I would just get another lock mechanism.
By the time you disassemble the lock, test then remove the microswitch, solder in the new microswitch, re assemble the lock you could have changed the lock mechanism a dozen times.
That's if you can get a new switch in the first place.