Ah, there might still be an aerosol of silicon spray in my wife's wardrobe; for making rubber-wear shiny.Assuming a D-Lock here, but I did use regular WD40 for a while but if left outside all the time it gets washed out. Wet Lube works well but can attract dirt and as noted that can gunk up the mechanism but it's easy enough to flush out with a can of spray brake cleaner and then relubricate.
Best option for me is silicon lubricant (WD-40 have it in their specialist range), it works really well, doesn't wash out or attract dirt. I use it for a number of things - the pistons for disc brakes for one - but it's also good for sticky curtain track amongst other things.
I would NEVER use silicone for metal to metal lubrication. It promotes galling.
Fantastic for plastic-plastic or metal-plastic. Not metal-metal. You might get away with it on a low load application like a lock but I wouldn't risk it