Detta skulle göra det, med den högre id_image
visas i den första luckan:
INSERT INTO new_table
SELECT t1.id_image, t1.score, t1.stddev, t2.id_image,
t2.score, t2.stddev, t1.id_location
FROM old_table t1
JOIN old_table t2
ON t2.id_location = t1.id_location
AND t2.id_image < t1.id_image