Jan,
From the documentation I gather the lower is not a supported operator nor supported function. See https://docs.mendix.com/refguide/oql-operators and https://docs.mendix.com/refguide/oql-functions
So you’ll need to solve this in the model by having the data available or input as lowercase before running the query.
And maybe add the option for support of the lower and upper functions as an idea on the idea forum.