If you are using a temporary table to get around the mutating table error, then you need the row level trigger to insert rows into the temp table, and you need a statement level trigger to update the other row in the table. You have two row level triggers which each fire independently and in no particular order. Even though they fire on different columns.