CREATE TABLE table_50945 ("Rider" TEXT, "Manufacturer" TEXT, "Laps" FLOAT, "Time" TEXT, "Grid" FLOAT)

What is the lowest number of Laps that have a Time of +24.440, and a Grid higher than 18?
SELECT MIN("Laps") FROM table_50945 WHERE "Time" = '+24.440' AND "Grid" > '18'
SELECT MIN("Laps") FROM "table_50945" WHERE "Grid" > '18' AND "Time" = '+24.440'