During the rest of the year, saying “HaMelech HaMishpat” is valid and does not require going back. During the Ten Days of Repentance, if you mistakenly say “Melech Ohev Tzedaka U'Mishpat” [the regular-year wording] and catch it within the time it takes to say a short phrase, say “HaMelech HaMishpat.” If more time has passed, don't say it — you are not required to go back.