The WMI uses the WQL
language which is only a subset of the SQL language, and doesn't include the IN
operator.
So you can rewrote tor sentence using the OR operator , like so
SELECT * FROM Win32_LogicalDisk Where (DriveType=3) or (DriveType=5)
or using the your WQL sentence.
SELECT * FROM Device WHERE (__CLASS="Device1") OR (__CLASS="Device20")