Molasses doesn't require refrigeration for it to keep and you can keep Molasses out on the shelf or in the pantry for several years without refrigeration before it goes bad.
Molasses does eventually go bad and start growing mold in it if you don't use it up in time but it can take up to 10 years or longer for mold to grow in Molasses.
Molasses lasts up to a decade or 10 years without refrigeration but you can refrigerate the Molasses if you want too and it won't harm it and will keep it fresher.