How to enhance speed of UPDATE statement
Change the temp table to:

CREATE TEMPORARY TABLE cons_temp (
    PRIMARY KEY(consultant)
    ) ENGINE=InnoDB
    SELECT DISTINCT consultant_id, consultant
          FROM testdata_biactivtity_rob;
There is no need for the create table to be in the transaction, so start with

SET autocommit=ON;


This will isolate the "wait timeout" to the UPDATE.