I have some Unifi AP-LR with Firmware 18.104.22.16820. 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 (22.214.171.12485) 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/126.96.36.19985/BZ.ar7240.v188.8.131.5285.170508.0942.bin -O /tmp/fwupdate.bin syswrapper.sh upgrade2 &
After upgrading the firmware to 184.108.40.20685 the automatic upgrade work again, also the https links are working now.
upgrade 220.127.116.1185 to 18.104.22.16853
upgrade 22.214.171.12453 to 126.96.36.19925