UPDATE (SELECT @rownum:=@rownum+3 as rn,id,order_ from
(SELECT id,col1,col2,order_ from
table where 1=1
ORDER BY col asc) h, (SELECT @rownum:=0) t)t1,table t2
set t2.col1=t1.col1 where t2.id=t1.id;
UPDATE (SELECT @rownum:=@rownum+3 as rn,id,order_ from
(SELECT id,col1,col2,order_ from
table where 1=1
ORDER BY col asc) h, (SELECT @rownum:=0) t)t1,table t2
set t2.col1=t1.col1 where t2.id=t1.id;