To be safe, only quote if db is MySQL, otherwise pass through unquoted. We need to keep this code working on a wide range of databases and our goal here is to fix MySQL without breaking anything else. It's possible other databases follow the MySQL "standard" of using backticks and would break if column names are quoted with double quotes.

See my original comment:
> The important thing is to make sure that the lock column is quoted for
> MySQL. So how about we restrict the change to do quoting for MySQL and
> don't do any quoting at all for other databases? That will fix the problem
> for MySQL and also reduce the chance of causing problems with other
> database systems. I know PostgreSQL and standard SQL use double quotes for
> quoting, but I'm not confident that we can easily come up with a set of
> quoting rules that would work across all the different systems Play
> interacts with. Even if we could, we'd have a lot of testing to do!

So can you please:
* only quote for MySQL
* rename this method something like quoteForMySQL (we can rename later if it does more general quoting)

You also may as well move the logic for isMySQLDatabase into this method. You can make it a local function if you like. (But if you prefer a separate method that's OK too, a local function is my preference though.)