Before putting that lock back in the stock, Soak the lock in some good Alcohol based cleaner, to get all the Accumulated crud out. Then after it dries, test it carefully for movement, and "FEEL" for any burrs. If they exist, take the lock apart and remove them. Then oil the internal parts of the lock well, with a good oil.
Finally, check that lock mortise for wood chips. Factories are notorious for not cleaning off chips, and burrs in these places. Clean them out, and then give the mortise a good, THIN coating of gunstock oil finish, or any other kind of wood sealer. You want to keep OIL out of the wood itself, which will soften, and WEAKEN, an already weak area of your stock. Finishing and sealing the lock mortise makes it much easier to keep clean, so you don't transfer crud from there to the internal parts of the lock.
Removing the lock, cleaning,( old toothbrush, and soap and water), rinsing( water then alcohol) then re-oiling the parts, and checking the screws for tightness, should be part of the cleaning process you do every time you use the gun. I clean my locks while letting the barrel SET and SOAK with soap and water, to give the soap the chance to do its job.