First, please make sure that your phone has Bluetooth enabled and is physically close to the lock during the firmware update, as it transmits data via Bluetooth, which has a short range of less than 30t.
If you’re updating the Aegis firmware and it fails, you can unpair the Aegis door lock with the Wi-Fi gateway or sentry doorbell (whichever it is currently connected with) and try updating firmware again