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