Basically what I want to do is copy the value of a column from one table to another column in another table.
The query I am using is:
UPDATE t1 
SET prod         
        
Use the old value if the query returns null:
UPDATE t1 
SET product_code = 
ifnull(
    (SELECT `value` FROM t2 WHERE t2.variant_id = t1.variant_id AND key_id = 10), 
    product_code);
FYI, in mysql using the old value doesn't count as an "update" in any way (either the number of rows affected or the logged changes)