It is possible that the code you are trying to use has expired or is invalid. If the code has expired because the promotion is no longer active, it cannot be used anymore.
If it is not valid, check that the discount is applicable to at least one of the products in the cart and make sure you have entered the code correctly (uppercase/lowercase, spaces).
Make sure you are not entering the promo code in the gift card box.