maybe try the solution here:?

https://www.w3docs.com/snippets/php...-time-of-30-seconds-exceeded-in-php.html

from the link:

Now, let’s see an alternative solution. This option is more recommended that the first one.

All you need to do is adding set_time_limit(600) inside the code. The input parameter is the maximum execution time. The meaning of 0 is unlimited.

However, you should be careful, as, in the case of an endless job, you may hang your server. So, we recommend you not to set the value too high.