MySQL Update Multiple Rows in Large Table
SHOW ENGINE INNODB STATUS\G
and see
https://stackoverflow.com/questions/6000336/how-to-debug-lock-wait-timeout-exceeded
increasing the lock timeout period could solve the issue. 
Apparently default is 50seconds. Which is maybe enough for all of the rows with userid=99, but not enough for rows with 99,22,88 or 7 userid. 
Just speculation.