First, remove the lock, take it outside and spray it out with a spray can of automobile brake cleaner or carburetor cleaner. Both work well in cleaning out any crud but they strip out all of the oil as well so you will need to lightly oil the working parts before replacing into your stock.
With the lock out, plug the vent/nipple hole, stand your gun up and fill your bore with warm soapy water. Let it sit for about 10 minutes or so to soak the crud loose. Then pour out a little bit of the water, put your thumb over the muzzle and tip your gun up and back to slosh the water around in the bore. Pour it out and repeat. Then using several patchs soaked in soapy water, swab out your bore until they come out clean. Now, use several dry patches to dry your bore as well as you can. Then spray WD-40 down your bore and let it sit for a few minutes to remove any residual water. Thoroughly wipe out all of the WD-40 that now has moisture in it. When your bore has been thoroughly wiped out, use a patch with a good gun oil such as Birchwood-Casey Barricade to coat the inside of your bore with a good coat of rust preventive and you are done with the bore. Don't forget the rest of the gun.