Exemplo :
$query = "update tabela set coluna1 = 1 where id = {$id_m} union
update tabela set coluna2 = 1 where id = {$id_v}";
Exemplo :
$query = "update tabela set coluna1 = 1 where id = {$id_m} union
update tabela set coluna2 = 1 where id = {$id_v}";