For long-running tasks, two options come to my mind:
Use an asynchronous task queue. They are designed for long-running tasks. Schedule one job for each newly registered user. Be sure to set the timeout longer than your estimated 30s. Pass the user instance to the constructor of the job and store it to an instance variable. From within the handler, just update the record directly.
Implement a callback via http. This requires control over the remote api. When calling the remote api, you would submit a callback url, such as
https://local-app.domain/callbacks/finished-check-user/223 where 223 is the id of the user. The remote api would send a http request to the given url after it's finished processing. In your local app, have a controller handle the request, fetch the user by its id and update it with the data received from the remote api in the request body. Don't forget to make sure the request is authentic.
Does this help?