BEFORE INSERT validation trigger for GPS coordinates
Load the new data into a temporary table.
Batch compute distances (one UPDATE the temp table)
One INSERT..SELECT to copy the rows that are within the desired distance.


If you need to write an expression for distance, suggest using Pathegorus, with an adjustment to the longitude of COS(latitude).

Batching things is often a faster way to do bulk operations.