Hi Trasgu,
If you ever stuck in db> prompt, please issue db> cont or db> reset.
In case if the above command, doesn't help we can proceed with the reboot of the device. If you were unable to upgrade the device from the CLI, you can proceed with the USB Bootloader upgrade method - https://www.juniper.net/documentation/en_US/junos12.1x44/topics/task/installation/security-junos-os-boot-loader-usb-storage-device-srx-series-device-installing.html