Checking if the access token is valid or expired
You seem to ignore two facts.

The client clock can be out of sync with the server clock.

The transport of the request from client to server takes more then zero time.


Both these cases mean that no matter how hard you try on the client side, there is always a chance that the server will evaluate the token as expired during its processing.
What you should do is have the client take the same action when server refuses the token as you do when your client side validation fails.
In general, client side validation

is not necesary
is not reliable
reduces network traffic
increases user experience

Whereas backend side validation

is necesary
is the only source of truth

Clients should understand and handle possible server side validation errors prior to deploying their own validation logic.