download-from-binary-cache.pl: Fix race condition

Fixes the error "DBD::SQLite::db do failed: column url is not unique".