Where is the maintenance mode value in the database? I know the maintenance mode value used to be in the variables table, but in D8 that table is replaced by (or joined with) the config table, but I couldn't find any row with that name.

Where is it located now?
It's no longer a part of the config system; it's a part of the state system which is stored in the key_value table as a part of the state collection.