Does a PHP script stop running when you receive 504 Gateway Timeout?

I am on a shared server (Siteground) and, my PHP WordPress script taking more than 30 seconds, it returns a 504 gateway timeout.

Will my request be executed and completed if it does not encounter any additional error?