Token error 401

We have 2 servers, one for production and one for testing. Every night we make a git backup on production server and restore it on the test-one. Suddenly tokens on the test server, both access and impersonation, stopped working, error 401, while on production server everything is fine. What could possibly cause this behavior? Why very same tokens work on one server and don't work on another which is the copy of the first?

Image_47

Edited by brancott