The relevant statutes are designated in the Wikipedia article on the topic, and unfortunately I couldn't find any in translation.
There are a couple of possible scenarios that might play out differently, and I suggest some plausible ways that the Hungarian law might address the issue, just from the general context of how naming laws often work in places that have them, without recourse to Hungary's specific legislative language.
If the name is permissible under Hungarian law in all other respects and the child is a first child, I strongly suspect that it would be possible to obtain a dispensation to change the rule adopted in the marriage certificate if both parents agreed (as the question seems to indicate that they did), probably pursuant to the rules of a legal name change in Hungary (ultimately the Minister of the Interior of Hungary has the final word apparently on this issue of great national importance (sarcastic tone intended)).
How can I change my birth name?
The change of a birth family and/or given name(s) of a Hungarian
citizen is subject to the approval of the Minster of Interior.
The change of a family name of a parent affects all minor children
with the same family name, unless explicitly asked otherwise. If the
spouse has a married name that includes the family name the change is
requested for, the change will affect the married name too. Both
parents shall consent to the change of the name of a minor, unless one
of the parents does not have parental custody. If your child is
grown-up, he or she should apply for a name change in his or her own
The civil registrar can once change the given name(s) of the child
upon the request of both parents. It is also the civil registrar who
is responsible if the request is for changing the order or given names
or abandoning one of the given names.
How can I change my married name?
A Hungarian citizen can have his or her married name changed during
the marriage or after the marriage is dissolved, even on multiple
Form for requesting the change of a birth name
Form for requesting the change of a married name
If the name was chosen contrary to Hungarian law by one parent unilaterally, I suspect that the other parent or their family members could enforce the choice set forth in the marriage certificate.
On the other hand, if the name is not permissible under Hungarian law, for example, because a first child was given a different family name and Hungarian law requires that all children of a couple of the same family name, then Hungarian officials would probably register the subsequent child born abroad under the name that should have been used if the child had been born in Hungary. The true birth name might be used informally as a nickname or alias, but wouldn't be a legal name.
This would not be that big of a deal if the child were registered in Hungary as a young child, but might be thorny if, for example, the child was now 16 or even 20 years old and had lived under the other name for most of the child's life. But, this may very well have never come up. Hungarian law also allows people who are nationals of other countries to use their home country names, and I wouldn't be surprised in a sympathetic Hungarian judge might declare that the older child, who might very well be a dual citizen in any case based upon a foreign birthplace, might be permitted to keep the foreign approved choice of name as a "de facto" foreign national for naming purposes at least.
While it didn't come up in the question itself, one issue, which is pretty similar for a Hungarian born child and one born abroad and given a foreign birth certificate, is what would happen if the child were given a name, with the consent of both parents, that was not recognized by Hungarian law as legal under any circumstances (e.g. an individual name that is not on the list of Hungarian names and is not approved upon application to the proper Hungarian authorities, i.e. the Research Institute for Linguistics of the Hungarian Academy of Sciences, such as "Kovács Elevatorbird", or a surname that is not shared by either parent, such as a patronym like "Jánosfiú Erzsébe", or toponym like "Prague Erzsébe", or perhaps a completely unrelated name that both parents favored like "Ramone Erzsébe" in honor of the name changing rock stars).
Presumably, an appropriate judge or administrative official would choose and impose a Hungarian approved name instead, the family name "Kovács" in this case, and perhaps an individual name of a same gender Hungarian grandparent, or of the appropriately gendered saint with a saint's day closest to the child's birthday, or something like that. Or, the official might decree that a name of the official's choosing will be imposed if the parents don't select an approved name.
I suspect that, in practice, nobody has defied the naming rules of Hungary defiantly enough and insistently enough to resolve the issue definitively in Hungarian law. In the meantime, the child might be legally designated by a placeholder name equivalent to the American "John Doe" and "Jane Doe" for the purposes of the legal proceedings.