In addition to the access token (the access_token parameter), the
response contains the number of seconds until the token expires (the
expires parameter). Once the token expires, you will need to re-run
the steps above to generate a new code and access_token, although if
the user has already authorized your app, they will not be prompted to
do so again. If your app needs an access token with an infinite expiry
time (perhaps to take actions on the user's behalf after they are not
using your app), you can request the offline_access permission.

So you should re-run the steps to generate an access token, or require the offline_access permission.