The normal dry lube for locks is graphite. It can be bought as a powder in a tube. It is usually quite cheap.
It is very messy if you are not careful because it is the same stuff as pencil leads are made from.
You only need to spay a wee tiny bit into the lock set by giving the tube a small squeeze. You don't want to have it making black smudges everywhere.
The reason graphite is used is it does not attract moisture or gritty dust and does not go gummy as it ages.
There is also a version of this that uses molybdenum sulphide instead of graphite. It is a black and messy dust too.
Wear gloves, only use a bit exactly where you need it, clean up any excess and wash your hands so you don't make smudges.
The spray lubes like WD-40 and others work too but they are usually oil and other chemicals in solvent carriers, and the lubrication is usually secondary to what they were designed for.
WD-40 for example was intended to disperse water from the area you spray it. That is what the WD in the name means, water displacement. It displaces water by bonding to surfaces better than the water does. It is great stuff for drying ignition wiring. I know quite a few people who hose the wires under the hood of a car to keep them dry and prevent arcing.
It makes a decent starter spray for diesel motors too.
edit:
I use WD-40 quite a bit mostly because it is a lot less messy than spilled graphite.
_________________________
May set off to explore without any sense of direction or how to return.