This is not the first time I’ve mentioned this, but one of the challenges that come with talking about writing direct database queries to update information in the WordPress database is that you leave yourself open to something like:
Yeah, but there’s an API to do something just like that.
And, in many cases, that’s right. I’m a big fan of using ’em, too. But there are times where direct, parameterized database queries can be a more optimal choice.

No, it’s not a database but wouldn’t it be awesome if they looked like this? Photo by Tobias Fischer on Unsplash
This is, of course, contingent on the environment in which you’re working the requirements of your project.
So this is yet another post that’s going to be an illustration of how to use $wpdb to quickly update information based on metadata (without using something like WP_Query or WP_Meta_Query to handle it).