Don't hit database most of the time.

When we do hit the database, it is going to be hit from several threads
at the same time. Thanks to the WHERE condition only one of them wins.