Convert binary UUIDs to hex when using it in SQL statements (see #6265)