OK, folks, a little chemistry to clear things up. Billdogg has it correct, I'm just going to expound on his explanation a little.
Unless the salt mix contains organics (there's a few brands that do, but not very many), it can't "spoil" as in go rancid or grow bacteria.
The principal element in a salt mix is, of course, sodium chloride. The principal minor elements are calcium chloride, sodium bicarbonate and/or sodium carbonate, magnesium chloride and sodium or magnesium sulfate.
That's 99%+ of the salt mix. There are many other ionic salts in the mixture, but they are all present in minute quantities, so we can ignore them for this discussion.
As most know, calcium carbonate is insoluble for all practical purposes in pure water. Among other potential reactions, calcium carbonate can be formed by mixing ionic calcium with an ionic carbonate. For our purposes, the principal source of these two reactants is calcium chloride and sodium carbonate/bicarbonate.
To actually get calcium chloride and sodium bicarbonate/carbonate to react, they must either be dissolved in water as two solutions poured together, or as two solids in close contact with enough humidity to hydrate the outer layers of the crystals.
When manufacturers make salt mixes, they must therefore be very sure that they've properly dried all of the salt mix components, and the manufacturing facility must also have a dry atmosphere, because a lot of the components of the salt mix are hygroscopic. Hygroscopic means the substance will pull moisture out of the air; a rather impressive example of this is solid sodium hydroxide (lye) - if left out on the counter in a house with ordinary humidity, it will be a puddle in a matter of 30 minutes or less.
So, if a salt mix is kept in an anhydrous or nearly anhydrous state, it will still mix up with very little insoluble calcium carbonate reside for years after it was initially compounded at the manufacturer. However, the plastic bags that salt mix is typically packaged in is not a perfect moisture barrier; technically, neither is the plastic bucket packaging, though it has a far lower water vapor transmission rate (WVTR) than a relatively thin plastic bag.
So when either stored for a long period in its original packaging, particularly at elevated temperatures, or when opened and not effectively re-sealed by the aquarist, the salt mix will start to pull water from the surroundings, and this allows the calcium chloride and sodium carbonate/bicarbonate to react and form insoluble calcium carbonate. This insoluble calcium carbonate will act to form "bridges" between the crystals of the materials in the salt mix, and eventually the whole mass will form one solid clump.
So what does all of this mean for the reefer? First, always start with your mixing container full of RODI, then add salt mix slowly to reach the desired specific gravity. Never start with the salt mix on the bottom of the bucket and add water - the initial solution will be highly concentrated, and the higher the concentration, the greater the tendency for the dissolved calcium chloride and sodium carbonate to react to form insoluble calcium carbonate.
Second, always store your unused salt mix in a sealed plastic bucket, and be scrupulously careful never to scoop it out with a wet container. If you buy your salt in plastic bags packaged in cardboard as I do, buy a 5 gallon plastic bucket at the home store with a lid that includes a gasket. Clothespin the bag closed by folding it over several times (or use a chip clip), then seal the bucket tightly. Store the bucket at room temperature or slightly below, and never store it under the stand for your aquarium; the elevated temperature and humidity will work against you.
If you do have salt that's clumped, you can still use it. You will just get a good deal more insoluble calcium carbonate in the bottom of your mixing bucket, and you will need to test the mixed salt water for alkalinity and calcium content to ensure that you have a starting point that you think you have for your water changes. In an extreme case, you may have 20% - 40% less calcium and alkalinity than advertised by the specific salt mix. If you're keeping fish only, the calcium and alkalinity won't matter all that much. If you're keeping a reef, you may want to add in some 2-part calcium/alkalinity solution to your mixing salt water to raise the calcium and alkalinity to the ranges that you desire.
Happy Reefing. :thumbsup: