Identical subquery optimisation in an update
MySQL lacks common table expressions but you can achieve the same goal here with the multiple-table update syntax:

update activitybooking 
       cross join ( select sum(pool1_count) p1, sum(pool2_count) p2, sum(pool3_count) p3
                    from `activitybooking` 
                    where `abt`='12' and (id='958' or `submitted`='1' or `submitted`='3' or `submitted`='8') ) z
set `submitted`='1'
where id='958' and p1

(SQLFiddle here)