Refactor SQL statement to prevent table join

Related to Issue #703. 

It would also still make sense to add a index:
add_index :maxmind_geolite_city_location, :loc_id, using: 'hash'