Hello and welcome to just answer. Let me see if I can help you with this. Did you program the vehicle's VIN# into the new PCM?
Ok, then either the exchange folks got the VIN# wrong, or this re manufactured PCM is defective. If the old PCM will still run the engine for 30 minutes like you say, then the Problem must be with the new PCM. I think you need to return it and get another one (this happens some times).