SELECT 
  lang.name, 
  IF(
    cscart_ult_language_values.value IS NULL, 
    lang.value, cscart_ult_language_values.value
  ) as value 
FROM 
  cscart_language_values lang 
  LEFT JOIN cscart_ult_language_values ON cscart_ult_language_values.name = lang.name 
  AND company_id = 2 
  AND cscart_ult_language_values.lang_code = lang.lang_code 
WHERE 
  lang.lang_code = 'ja' 
  AND lang.name IN (
    'social_buttons.facebook_cookie_title', 
    'social_buttons.facebook_cookie_description', 
    'social_buttons.pinterest_cookie_title', 
    'social_buttons.pinterest_cookie_description', 
    'social_buttons.twitter_cookie_title', 
    'social_buttons.twitter_cookie_description', 
    'social_buttons.vkontakte_cookie_title', 
    'social_buttons.vkontakte_cookie_description', 
    'social_buttons.yandex_cookie_title', 
    'social_buttons.yandex_cookie_description', 
    'social_buttons.facebook_cookie_title', 
    'social_buttons.facebook_cookie_description', 
    'social_buttons.pinterest_cookie_title', 
    'social_buttons.pinterest_cookie_description', 
    'social_buttons.twitter_cookie_title', 
    'social_buttons.twitter_cookie_description', 
    'social_buttons.vkontakte_cookie_title', 
    'social_buttons.vkontakte_cookie_description', 
    'social_buttons.yandex_cookie_title', 
    'social_buttons.yandex_cookie_description'
  )

Query time 0.00079

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "lang",
      "access_type": "range",
      "possible_keys": ["PRIMARY"],
      "key": "PRIMARY",
      "key_length": "392",
      "used_key_parts": ["lang_code", "name"],
      "rows": 10,
      "filtered": 100,
      "index_condition": "lang.lang_code = 'ja' and lang.`name` in ('social_buttons.facebook_cookie_title','social_buttons.facebook_cookie_description','social_buttons.pinterest_cookie_title','social_buttons.pinterest_cookie_description','social_buttons.twitter_cookie_title','social_buttons.twitter_cookie_description','social_buttons.vkontakte_cookie_title','social_buttons.vkontakte_cookie_description','social_buttons.yandex_cookie_title','social_buttons.yandex_cookie_description','social_buttons.facebook_cookie_title','social_buttons.facebook_cookie_description','social_buttons.pinterest_cookie_title','social_buttons.pinterest_cookie_description','social_buttons.twitter_cookie_title','social_buttons.twitter_cookie_description','social_buttons.vkontakte_cookie_title','social_buttons.vkontakte_cookie_description','social_buttons.yandex_cookie_title','social_buttons.yandex_cookie_description')"
    },
    "table": {
      "table_name": "cscart_ult_language_values",
      "access_type": "eq_ref",
      "possible_keys": ["PRIMARY"],
      "key": "PRIMARY",
      "key_length": "396",
      "used_key_parts": ["lang_code", "name", "company_id"],
      "ref": [
        "cscart_purchase_fl_com.lang.lang_code",
        "cscart_purchase_fl_com.lang.name",
        "const"
      ],
      "rows": 1,
      "filtered": 100
    }
  }
}

Result

name value
social_buttons.facebook_cookie_description Facebook Cookieは、製品ページのFacebookボタンなど、Facebook関連の機能を有効にします。これが <a href="https://www.facebook.com/about/privacy/previous" target="_blank">のFacebookプライバシーポリシー</a>です。
social_buttons.facebook_cookie_title フェイスブック
social_buttons.pinterest_cookie_description PinterestのCookieは、製品ページのPinterestボタンなど、Pinterest関連の機能を有効にします。これが <a href="https://policy.pinterest.com/en/privacy-policy" target="_blank">のPinterestプライバシーポリシー</a>です。
social_buttons.pinterest_cookie_title Pinterest
social_buttons.twitter_cookie_description Twitter Cookieは、製品ページのTwitterボタンなどのTwitter関連の機能を有効にします。これが <a href="https://twitter.com/en/privacy" target="_blank">プライバシーポリシー</a>です。
social_buttons.twitter_cookie_title ツイッター
social_buttons.vkontakte_cookie_description VK Cookieは、製品ページのVKボタンなどのVK関連の機能を有効にします。これが <a href="https://m.vk.com/privacy" target="_blank">プライバシーポリシー</a>です。
social_buttons.vkontakte_cookie_title VK
social_buttons.yandex_cookie_description Yandexは、複数のソーシャルネットワークのボタンを(たとえば、製品ページに)表示するのに役立ちます。これが <a href="https://yandex.com/legal/confidential/" target="_blank">プライバシーポリシー</a>です。
social_buttons.yandex_cookie_title Yandex