The likely answer is that it you are sending a client token to the server and storing it there, and it has expired before being used. Tokens expire after about 30m and need to be refreshed. So if you're sending the token from a client and it's close to that deadline, you'll want to refresh it and send to the server again. There are some API methods like
addTokenIdListener to help you detect changes on the client and you can pass a boolean to getIdToken to force a refresh if you know it's close to the 30m mark.