WD40 is a terrible thing to subject a lock to. It is a penetrating oil, it drives off water, breaks up rust and frees things up, and it leaves behind a thick, sticky layer to stop rust by stopping water getting on the coated parts.
But locks are made of brass and stainless...
WD40 ends up glueing a lock up inside, as every bit of grit, dust and sand gets in there and bound to the moving parts. These then wear lots, and get jammed.
Use something that leaves a non-sticky residue behind. I use a couple of teflon based oils, and sometimes graphite.
I could also tell you about the graphite mining opportunities to be found in the old 3 lever locks around here, though. Years of little puffs of graphite because it's a bit sticky means that you find the lock case half full of it.

Loading pithy, witty comment in 3... 2... 1...