SQL query delete post and postmeta by meta key and value

DELETE p, pm
  FROM wp_posts p
 INNER 
  JOIN wp_postmeta pm
    ON pm.post_id = p.ID
 WHERE pm.meta_key = 'vimport_key' 
   AND pm.meta_value = 'some value';