Is there a time limit for this value? No matter how long it takes?
Please note that generating a SAS token with a longer duration can increase the security risk. So you should only do this if it is necessary for your scenario.
As Roman Kiss Suggested, You can set the duration for the SAS token.
The default value is 3600 seconds. You can set the token expiration as desired.
For ex:
az iot hub generate-sas-token -n myIoTHub -d myDevice --du 630720
Hope this helps. Do let us know if you have any further queries.
If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.