So this is the query I want to use. I think it's easier to just look at it and see where I am in the wrong:
UPDATE * FROM 'catalog_product_entity_varchar'
SET TRIM(LEADING '0' FROM 'value')
WHERE 'attribute_id' = '176';
Your SQL contains errors. First, remove
FROM, it is not using with
UPDATE. Second, write correct
SET to update column, not just select.
UPDATE `catalog_product_entity_varchar` SET `value` = TRIM(LEADING '0' FROM `value`) WHERE `attribute_id` = '176';
This must be working query. If this not works, add table structure and some data example, please.