How to use OR in a CON statement, in the ArcGIS Raster Calculator?
For building complex statements, you can get more information here
It is important to know the precedence level of the operators. For example, Boolean (~, &, ^,|) operators have a higher precedence level than Relational (<, <=, >, >=, ==, !=) operators, which has an impact on how you construct your expressions. For more information on operator precedence, see the second table on this page
I copied the above-mentioned table at the end of my post, it goes from lowest to highest precedence(note that it is not the same precedence in C++). Operators with the highest precedence are grouped together first, this is why you need parentheses if you want to force evaluating ">" before "|".
Without parentheses, your parser is trying to read
Con(("Raster1" > (10 | "Raster2") < 20),30)
<, <=, >, >=, ==, != (Less Than, Less Than Equal, Greater Than, Greater Than Equal, Equal To, Not Equal)
| (Boolean Or)
^ (Boolean XOr)
& (Boolean And)
<<, >> (Bitwise Left Shift, Bitwise Right Shift)
+, - (Addition, Subtraction)
*, /, //, % (Multiplication, Division, Integer Division, Modulo)
+, -, ~ (Unary Plus, Negate, Boolean Not)
** (Power)