I've used WD40 on at least a couple occasions with car door locks with decent results..but one occasion it didn't help, either. WD40 was developed as the 40th formulation of a water dispersal/lubricant for the Apollo program, after all... With all the salt and grit we have on the roads up here, sometimes the door locks on our cars get jammed up with sand and salt crystals as well, and occasional squirts of this stuff helps in those cases, too.
Back when keys were made entirely of metal, if a lock was really frozen we'd heat a key with a butane lighter and stick it into the lock. If it still didn't turn, one could hold the lighter's flame under the end of the key and it would continue to heat/defrost the lock. However, with plastic handled keys and programmed chips embedded in them now, this is something to be avoided at all costs if you ever want to get into the darn vehicle (and especially if you want it to start ) !!!!!