The following article had a solution that worked for us: 

To expand that into a step by step I've detailed that here. Commands to type in SSH are shown in bold here, my explanatory comments in (brackets) should NOT be typed.
Be very careful to ensure you have the correct URL for the correct firmware version.

SSH to the USG and Login.
sudo su (become a super user)
vi /usr/bin/ubnt-upgrade (edit the upgrade script)
Go down to Line 504 using the arrow keys. This line should read exit 1. Ensure the cursor is at the start of the line.
I# (switch to insert mode and add a # to comment the exit 1 command)
press [esc] (to exit insert mode and issue a new vi command)
:wq (issue a write and quit command to vi)
upgrade (run the newly edited upgrade script)
Ignore the "Upgrade failed" message and wait until the script completes and the USG reboots.
Check the firmware version with the info command.

The whole process should only take a few minutes.