Padlocks can freeze when water, condensation or some kind of moist reach the inner parts of the mechanism. You can prevent that by using heavy duty grease or as simple as Vaseline. It should be used at a dry spot so that you don’t trap the water in it. This method can prevent the moisture from getting in. It is better than a lubricant as they tend to lock dirt and tacky substances which can lead to a lot more difficulties.
Padlocks and locks getting frozen is one of the top issues of winter. To prevent that from happening, take a few precautionary steps. Getting a lock covered is an easy trick and can be done with almost anything. Use a sock or a plastic case. These will prevent the snow from getting into the locks and condensation will not run down into the inner parts of the lock. Make sure you do it on the right time that is before the winter cold winds hit.