Hello, @andrea.speziale,
Once a token is generated, it is not possible to modify it in any way, including to invalidate it. Your application would have to have logic to handle that.
I recommend that you read this document, which I really enjoy, to understand what I call “The Three Layers of Logout”: Logout