Clean the inside rim of the can of Spackle using a small screwdriver that fits inside the inner rim. Since Spackle is a paste, it's easy for a few pieces to lodge in the rim. Unless the spills are removed, the seal on the can will not be completely tight.
Verify that you have replaced the cover of the can as tightly as you can. You can use a few light taps of a hammer to ensure that the lid is firmly in place. If the can of Spackle is plastic with a lipped cover, look the container over after replacing the lid to be certain that the cover seals the container completely.
Store the can or tub in a cool place. Heat and sunshine have a drying effect on any kind of paste. If you can't control the temperature, slip the can of Spackle into a plastic bag and seal it tightly or tie the bag.