I don't know if login tokens ever expire on their own, but the server doesn't keep them in permanent storage. IIRC it's a RAM cache, so whenever somebody has to restart/reboot anything (like after making an update to the site code), it invalidates all the existing login tokens. The handling for users with invalid tokens isn't the greatest, so instead of immediately kicking you back to the login page, you sometimes get strange behaviour like "can't access stuff even though it looks like you're logged in".