Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

meta query

$meta_query = array(
	'relation' => 'OR',
	array(
		'key'     => 'key1',
		'value'   => 'value1',
	),
	array(
		'key'     => 'key2',
		'value'   => 'meta2',
		'compare' => '!=',
	),
);