"Found an answer myself. The table is ps_customer and the field I was looking for is is_guest." - didn't understand your specific use case initially because those are also "accounts" but guest ones.
"I'm aware that the group assignment correction will most likely have to be done manually." - If you are not good with SQL, can be done from an interface with a mass update module like QuickUpdate (example below).