3-in-1 oil has a vegetable base, or something unsaturated. It will oxidize in a relatively short time to a sticky gum. That happens even faster with heat (as in an electric motor). Use a good quality petroleum based lubricant, or a synthetic.
WD40 doesn't seem to oxidize, but it doesn't have enough film strength to provide lubrication or protection. I don't use it on guns, but it penetrates well for breaking screws loose - too well to use anywhere near optics.
I use milspec W25 grease on rails, with a layer of CQC floated on top. That's more slippery than raw oysters and lasts a long time. It doesn't stiffen in cold weather like petroleum based grease.