I would think this should be where WD-40 shines. WD originally meant water displacement. True?
True. WD-40 was developed for the US Navy to spray into water contaminated equipment to displace water that was already there, particularly electrical equipment. It's been around for a minute. The Navy has since switched to CRC products of varying properties for their different applications, mostly because the CRC lubricants are non-petroleum and non-flammable. WD-40 makes great flame thrower and bonds to surfaces better than water, ergo, displaces water. It's also good for damp ignition wires and the like. However, it does not magically ward off water after one use. The fallacy of WD-40 is that it will stay there forever. It will not, nor was that ever the intent, in fact, quite the opposite. The Navy didn't want flammable liquids left in their electrical enclosures, but most lubricants of the time were petroleum based, therefore, flammable. It does, in fact, evaporate in only a few weeks, typically leaving a residue of decaying fish oil which will form acids when combined with water and actually accelerate corrosion. If you use WD-40 because it worked good, keep a can with you to keep refreshing it, or it will simply stop working good when it disappears. Not that WD-40 is a bad thing. Absolutely not. I keep a can around for driling (excellent cutting oil), freeing rusted bolts/nuts, even loosening locks that are corroded. Once I've accomplished what I set out to do with the WD-40, though, I make sure I do something more permanent to mitigate the need for WD-40.
A better more permanent lubricant would be
Hilco Strong Arm in a Can. Great lubricant, and doesn't evaporate. But, like any other greased piece of equipment, locks require periodic maintenance. Every time you insert and extract the key, you're going to remove some of your favorite lubricant. There is no such thing as a water proof lock for which you can stick the key in your pocket or that has an exposed hasp that will go through chain links. Not happening. It might be for the first few days after you buy it, but any O-rings are going to dry-rot, and water will find a way. Gimmick locks are are a great way to give away money, especially considering any dishonest person that would break a cheap lock probably isn't going to slow down because it's a more expensive and fancier one. They're probably going to cut the chain with a pair of bolt cutters. If it's for security, you're better off with a well placed and hidden motion sensitive wi-fi game camera so you can find out who it was that cut the lock off your gate. Otherwise, the best thing is to have grease in the water's way, or get a lock that's less sensitive to water contamination and put some grease in it to get in the water's way.