That is one option (just make sure to have at least 1min delay between the two(rate limit)).
Another option would be to set the IPs in the URL. That way you only need one curl call. Something like this:
curl “https://update.dedyn.io/?hostname=${hostname}&myipv4=1.1.1.1&myipv6=2001::1” --header “Authorization: Token ${token_usage}”
Another option would be to use my script, which basically does the same as the curl above, with the difference that it checks for changes and only then issues the update curl.