Preventative maintenance is the regular check of locks, lock cylinders and doors to clean, lubricate and adjust them before they fail. It is done while everything is working, precisely so that it keeps working.
On the coast it makes more sense than anywhere: salt air rusts springs and cylinders, sand gets into ground floor locks and doors that go months without being used seize up.
A simple tip: every so often, clean the cylinder by blowing into the keyway and lubricate it with graphite or a dry lock lubricant, never with oil. If you notice the key going stiff, do not wait for it to snap inside. For blocks of flats and communal areas, see lock maintenance; for a worn cylinder, cylinder replacement.