UPDATE assets SET is_enabled=FALSE , deleted_at=NULL , deleted_by=NULL
,replaced_by = (SELECT new_asset_id FROM asset_replacements WHERE assets.id = old_asset_id LIMIT 1)
WHERE assets.id IN (SELECT old_asset_id FROM asset_replacements)