REST API 504 Timeout

When performing a bulk insert I’m getting a timeout after 60 seconds. Is there a way to increase the timeout setting for the REST API? Do I need to be concerned about the MySQL database timeout also?