As comes up whenever the "waiting for a new code" issue is discussed, you can enter that "old" code for usually up to 30 seconds. You don't need to wait.
If you set it up this way. An admin can choose not to or could allow e. g. 8 previous codes. That would allow four and a half minutes to put in any code of this timespan.