Innodb updates records with delay
There are two things you must remember is at play
TRANSACTION ISOLATION
The default for tx_isolation is REPEATABLE-READ.
It is plausible and probable that the update sub set done = done + 2  where main_id =1 is being held up.
In fact, your INSERTs must generate auto_increment values. This requires doing some sort of gap index locking. If other INSERTs are occurring on main and sub,
LOCKS ON DATA
You could potentially catch such delays in the act by running
SHOW ENGINE INNODB STATUS\G

The update sub set done = done + 2  where main_id =1 might be visible at some point due to any row-level locks and/or index-level locks.
Locking of the PRIMARY KEY for auto_increment generation must occur for INSERTs, UPDATEs, and DELETEs. I remember a hefty deadlocking exercise I went through with RedBlueThing

Jun 14, 2011 : Reasons for occasionally slow queries?
Jun 08, 2011 : Will these two queries result in a deadlock if executed in sequence?
Jun 06, 2011 : Trouble deciphering a deadlock in an innodb status log

I actually discussed this in a later post : How to analyse innodb status on deadlock in insert Query?