Update Multiple Lookup Fields

Update Multiple Lookup Fields

Hi.
I have fields which are lookup fields which are numerous and need to be updated with the same data.
However, the condition fields are also lookup fields.
Is there an easy way to do this?

the script would be if(lookup field1 == "text1", update all lookup field2 with "text2")

Thanks