add sleeping in case of selec lag in last_insert_id check