Hardware/Software 2FA tokens are based on a PRNG with a shared seed. If the table with passwords was accessed it's likely the table with 2FA seeds is hacked.
Twitter uses a one-time code sent via sms so I don't think this would be an issue unless the hack is persistent.