new way of getting id for bulk_create_with_manual_ids that will lock the transaction to avoid race conditions