Never use WD-40 on a lock. Don't use oil on a lock. Either might help for a short time, but will only gum up/collect dirt over time and make things even worse. Flush it out with alcohol to get any dirt out, then use a dry lubricant made for locks, such as Lock-Ease (an alcohol/graphite mix - the alcohol carries the graphite, then evaporates, leaving only dry graphite).