disclaimer : brainless proposition
(SELECT * FROM table WHERE (icount(ids) <= 1 AND ids[1] = 33)UNION ALL(SELECT * FROM table WHERE (icount(ids) > 1 AND ids && '{33}'));