Just wanted to leave my suggestion to reduce the frequency of the api calls.
Many modern router offer a dyndns feature.
I published a dummy GET endpoint in my local network which executes your update.php and entered the host as dyndns server in my router so it triggers the update script only when I receive a new IP from my ISP.