You cannot increase the function time constraint which is currently 120 seconds, this is globally set.
If you’re able to raise a support ticket we can take a look at the queries and may be able to suggest indexes that could help. Otherwise look into the following: