Failing at the 30 second mark looks a bit suspicious. In the past we've seen servers terminate a TCP connection at 30 seconds due to inactivity. If the connection is using HTTPS then the BRX CPUs encryption engine is being used, but by default it does not run to completion on one scan because that could cause huge swings in scan time, so it runs in a time slice on successive scan to completion. You can allocate more time per scan by setting DST68 ($TLSTimeSlice) which is the amount of time (in microseconds) the SSL / TLS encryption engine is allowed to run on each scan when trying to establish an encrypted connection to a server.
You might try bumping that up to a really big number to see if that changes the problem so that you know where the problem is coming in.
Another thing is if the HTTPCMD instruction itself is in a program code block, that too could be getting time-sliced ... try moving it to the Main program and see if that changes anything as well.