We try to stay away from editing Synology code if at all possible, for obvious reasons.
It might be that, in this case, you can't avoid it. If so, better to edit `/etc/php/conf.d/user-settings.ini`. 
This is where php changes via web services>php settings end up, such as php open_basedir, so changes are somewhat expected there (and those changes _should_ be retained even if PHP gets an update)

[This SO link] (http://stackoverflow.com/questions/16171132/how-to-increase-maximum-execution-time-in-php?lq=1) might provide another way to set the max execution time, although it depends on whether PHP is running in safe mode...not sure.