SELECT query returns legacy data
The general concept to consider with these issues is "transaction isolation level".

I believe the most plausible explanation with MariaDB would be that both writers and readers work in non-autocommit mode (either autocommit=0 in my.cnf or set explicitly where application opens new connection). In this case, you can give the reader sessions access to newly updated data by issuing their own local commit; command instead of full re-connect.