If you have no SD-WAN then:
- Create temporary network and set to same firmware version as live
- Add new MX to here and wait until on desired version and showing online.
- Make a note of WAN port(s) settings
- Remove old MX from live network
- Move new MX from temporary network to live network
- Enter WAN port info previously saved.
There are quite a few other discussions here as port mappings need to be understood if you use VLANs etc.