Ocorreu um erro no banco de dados

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'OR filCod = 1) AND galCod = 585) GROUP BY galCod ORDER BY galCod desc' at line 4

SELECT *,'CONCAT(fotID,fotExt) as imagem' FROM galeria_fotos A LEFT JOIN gal_fotos F on A.galCod = F.id WHERE ((filCod = OR filCod = 1) AND galCod = 585) GROUP BY galCod ORDER BY galCod desc