Jeroen, can you please provide more context? What exactly are you
trying to store? Why? How often? When will it be changed? By whom?
As of now the rather vague explanation provided make it sound like
it's a configuration flag, and should go into LocalSettings.php as a
$wgYourExtensionYourConfig = 23; variable.
https://www.mediawiki.org/wiki/Manual:Database_layout provides an
overview of the database tables that come with MediaWiki.
You are free to create a new table any time you want. Even if it's
only going to store 3 rows, that should be fine. I'm not aware of a
reason to not do this. Wikibase, for example, contains a table
wb_id_counters that is not meant to store new rows, but only a
strictly limited set of rows. You can copy the update mechanism
related to that table, if you like.
Kind regards
Thiemo