Access tokens expire after one hour. This expiry time is set on Spotify's side and can't be changed by the client.
You can refresh an access token if you're retrieving it using the Authorization Code flow. (The refresh token is practically valid forever, or until it has been manually revoked.)