It is not possible with Gluu 4.3 but it is possible with jans (next generation of Gluu AS under Linux Foundation).
https://github.com/JanssenProject/jans/
In jans you can:
1. add `UpdateTokenType` custom script
2. intercept `getAccessTokenLifetimeInSeconds` just before token get created.
In script you can access request object as `context.getHttpRequest()` which returns `javax.servlet.http.HttpServletRequest` under the hood.
Hope it helps.
Reference:
https://github.com/JanssenProject/jans/blob/4babe55a494c0edad899776f086d8c59368031f2/jans-linux-setup/jans_setup/openbanking/static/extension/update_token/UpdateToken.py#L88