uids are case insensitive in owncloud afaik @icewind1991 @karlitschek 

in this case the query should look like:
```sql
UPDATE `*PREFIX*users` SET `displayname` = ? WHERE LOWER(`uid`) = LOWER(?)