Looking at these lines in cargo source code, I suspect calling
HTTP_TIMEOUT=60 cargo build
might do the trick. The timeout is first read from a CargoHttpConfig whose origin I didn't manage to track, then from the environment, and finally it defaults to 30. Hopefully, the CargoHttpConfig doesn't have any value for the timeout, hence the value from the environment gets used.