As the name suggest the 24H access token only lasts for 24 hours as it is meant to be a resource for you to get up and running with out having to configure and set up an application and OAuth first. If you need/wish longer sessions you need to use OAuth to obtain an access and refresh tokens. The access token is used to authorize requests and the refresh token is used to create a new access token when the old one expires after 20 minutes. This can extend your sessions as for however long you wish to repeat the cycle of refreshing tokens.
More Resources