This is the wrong approach.
A regular user token last four hours ish
Other tokens last 60 days ish
So you should be generating a token and using it close to when it dies.
This sounds like you keep generating tokens and you have something thats using the first token which is now dead.
I don’t have this problem, so I’m not sure what you could be doing wrong.
My script(s) will generate a token, store it in redis, then everyone will use that token from redis.
And I have a cronjob that will remake that token and put it back into Redis.
So all my scripts should be using the same token.