I really hate it when the keys can't turn the door lock properly despite having the correct key. One of the reasons for this is the lock mechanism inside got rusty.
One of the 1st things I do after tenant leaves is to re-oil all the door locks with WD-40 oil. In this case I bought a WD-40 clone from MrDIY aptly called WD4. Pricewise it's much cheaper than WD-40 but produces same results. After oiling the door locks, use the key to turn the lock a few times to let the oil/lubricant seep deep into the lock mechanisms. After a few rounds of turning the door locks, you will find that opening the door with your key to be very smooth.