Should work if you order your UNION results by what SELECT they are “from” first, before the LIMIT 20 is applied:
SELECT … FROM
(
(
SELECT t.column1, t.column2, 0 AS ordervalue FROM … WHERE …
LIMIT 10
)
UNION
(
SELECT t.column1, t.column2, 1 FROM … WHERE …
LIMIT 20
)
ORDER BY ordervalue ASC # this will make the values from your first SELECT come
# first, then the ones from the second
LIMIT 20 # of those ordered values, the first 20 are taken
)
ORDER BY RAND()
I introduced a static value as ordervalue
here – in your special case it would not be necessary, since you select by status
1 or 2, so you could order by that value directly. But if that was not the case (or the status values would be different), that “pseudo” column value would be the way to go.