I have some Unifi AP-LR with Firmware 22.214.171.12420. The automatic Update not working. So here is the manually way:
Login to the AP with SSH (putty or WinSCP)
Download the oldest available firmware (126.96.36.19985) and upgrade the AP (use http, https only work after upgrading to 3.7.58)
rm /tmp/fwupdate.bin wget http://dl.ubnt.com/unifi/firmware/BZ2/188.8.131.5285/BZ.ar7240.v184.108.40.20685.170508.0942.bin -O /tmp/fwupdate.bin syswrapper.sh upgrade2 &
After upgrading the firmware to 220.127.116.1185 the automatic upgrade work again, also the https links are working now.
upgrade 18.104.22.16885 to 22.214.171.12453
upgrade 126.96.36.19953 to 188.8.131.5225