A simpler version of your SQL would be:
SELECT * FROM ip_store WHERE (scanned_status = false) ORDER BY random() LIMIT 1;
I have a similar use case that has alway returned a record using the ORDER BY random() method.
I believe the problem with your original SQL is that you are using the count of ALL records to calculate your OFFSET and then applying it to a filtered query. I bet your OFFSET is greater than the number of filtered rows. The ORDER BY random() eliminates that problem.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…