update h5perf_task set run_state = 0 where id in
(SELECT t.id from (SELECT * FROM h5perf_task WHERE run_state = 2
and UNIX_TIMESTAMP( now() )-UNIX_TIMESTAMP(begin_run_time) > 420) t);