No, WD-40 is not an anti-seize lubricant of lasting value.
You want a molybdenum disulfide. Paste lubricant, can/tub with a brush on the cap. Pretty much available in any auto parts store, the picture below, from Amazon.com.
And, by the way, it sticks to everything and makes a mess, so use sparingly and carefully.