Hi @divyav15815834 ,
As you have mentioned expiration set to 10 mins and token is generated every 5 minutes.
It is not recommended to update OOTB CSRF functionality.
We can find the CSRF token in below path:
/libs/granite/csrf/token.json
Also, default script CSRF is available in below path:
/libs/clientlibs/granite/jquery/granite/csrf/source/csrf.js
Both are internal area and the adobe does not recommend to override.
An alternative solution would be:
You can disable the CSRF token generation by initializing empty window.Granite.csrf variable wherever is not necessary if you are implementing custom CSRF.
Below piece of script help in disabling the CSRF token generation:
<script type="text/javascript">
window.Granite = window.Granite || {};
window.Granite.csrf = {
initialised: true
};
</script>
Please do consider the security checklist into consideration.