Tra connection.Open(); e command.ExecuteNonQuery(); Ho appena aggiunto due righe come questa:
connection.Open();
MySqlCommand cmd = new MySqlCommand("set net_write_timeout=99999; set net_read_timeout=99999", connection); // Setting tiimeout on mysqlServer
cmd.ExecuteNonQuery();
int numOfRecordsUpdated = command.ExecuteNonQuery();
Problema risolto :)