A system and method of managing computer sessions are provided. The preferred method opens a session (such as for access to a database) and creates a token that includes a session opening time and a measure of the session duration. If the token is used within a predefined time window before the end of the session, the session is extended by updating the token to reflect a new session duration. The time window and duration of a session extension may be adjusted according to usage patterns of the system. The session may be extended recursively. The token expires when the last of the session extensions expires.