Use the amount the state is reporting ($542).
The irs matched forms, and if they match your 1099-G, $542 is what they'll see.
Why is it different I can't say for sure, but you may have amended your return, the state may have adjusted your refund, or the state may be adding an additional amount, such as a property tax refund.