Seems like an old-school race condition:
Citing arrest warrants, here's how The Hartford Courant said the Connecticut scheme worked:
An investigator for the Connecticut Lottery determined that terminal operators could slow down their lottery machines by requesting a number of database reports or by entering several requests for lottery game tickets. While those reports were being processed, the operator could enter sales for 5 Card Cash tickets. Before the tickets would print, however, the operator could see on a screen if the tickets were instant winners. If tickets were not winners, the operator could cancel the sale before the tickets printed.
Source: Cops: Lottery terminal hack allowed suspects to print more winning tickets | Ars Technica