Your fix matches the spec boundary. RFC 7519 says the current time must be before exp, so rejecting when exp <= now is right. The same section also allows a small leeway for clock skew, usually no more than a few minutes, which is why libraries like jsonwebtoken have a clockTolerance option. The problem in the original was where the tolerance lived: 300 seconds written as a bare number inside the comparison, where nobody reviewing it would read it as a policy decision.
One habit worth carrying into the next 43 days: pass the current time into verifySessionToken instead of calling Date.now() inside it. Then you can write boundary tests that never flake. A token with exp one second in the past is rejected, one with exp one second in the future is accepted, and if you later add a named leeway of, say, 30 seconds, a token 31 seconds past exp is rejected. Those tests are what stop a minus 300 from creeping back in.