If you’ve joined the beta program for El Capitan (http://beta.apple.com) you might’ve been given a redemption code to use in the Mac App Store.
And you might get an error that the “Code redemption is temporarily unavailable. Please try again later.”
Try these two things:
1. Sign out of the App Store (click your username to get the option), quit App Store, and log back in again when you restart.
2. Repeatedly keep hitting the Redeem button when you see the error.