gpg: Keep a lock during the read-update/insert cycle in import.