From manual:
To obtain a random integer R in the range i ⇐ R < j, use the expression FLOOR(i + RAND() * (j – i)). For example, to obtain a random integer in the range the range 7 ⇐ R < 12, you could use the following statement:
SELECT FLOOR(7 + (RAND() * 5));
RAND() in a WHERE clause is re-evaluated every time the WHERE is executed.