DO NOT grease the key / barrel, you will be causing yourself problems, any fluff or grit will clog the barrel mechanism.
The key barrel and the electrical portion of the switch gear are not directly interconnected.
If the lock is stiffening due to water ingress then give it a quick blast of air to expel the water then a small amount of water dispersant to the key to assist operation.
If possible find a rubber cup to fit the top of the lock, cut a small slit into it so that the key can pass through it, this will assist in the prevention of water ingress to the key barrel.
Having said all this it will also depend on the age and usage of the lock, it may just be old and knackered.
assumption is the mother of all f*** ups.