SELECT 
  cscart_payments.*, 
  cscart_payment_descriptions.*, 
  IF (
    ISNULL(cscart_addons.status), 
    "A", 
    cscart_addons.status
  ) AS processor_status, 
  cscart_payment_processors.type AS processor_type, 
  cscart_payment_processors.processor_script AS processor_script 
FROM 
  cscart_payments 
  LEFT JOIN cscart_payment_descriptions ON cscart_payment_descriptions.payment_id = cscart_payments.payment_id 
  AND cscart_payment_descriptions.lang_code = 'ja' 
  LEFT JOIN cscart_payment_processors ON cscart_payment_processors.processor_id = cscart_payments.processor_id 
  LEFT JOIN cscart_addons ON cscart_payment_processors.addon = cscart_addons.addon 
  LEFT JOIN cscart_storefronts_payments AS storefronts_payments ON storefronts_payments.payment_id = cscart_payments.payment_id 
WHERE 
  cscart_payments.status = 'A' 
  AND (
    cscart_payments.usergroup_ids = '' 
    OR FIND_IN_SET(
      0, cscart_payments.usergroup_ids
    ) 
    OR FIND_IN_SET(
      1, cscart_payments.usergroup_ids
    )
  ) 
  AND (
    storefronts_payments.storefront_id = 2 
    OR storefronts_payments.storefront_id IS NULL
  ) 
HAVING 
  processor_status = 'A' 
ORDER BY 
  cscart_payments.position

Query time 0.00235

JSON explain

{
  "query_block": {
    "select_id": 1,
    "having_condition": "processor_status = 'A'",
    "filesort": {
      "sort_key": "cscart_payments.position",
      "temporary_table": {
        "table": {
          "table_name": "cscart_payments",
          "access_type": "ALL",
          "possible_keys": ["c_status"],
          "rows": 14,
          "filtered": 100,
          "attached_condition": "cscart_payments.`status` = 'A' and (cscart_payments.usergroup_ids = '' or find_in_set(0,cscart_payments.usergroup_ids) or find_in_set(1,cscart_payments.usergroup_ids))"
        },
        "table": {
          "table_name": "cscart_payment_descriptions",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "9",
          "used_key_parts": ["payment_id", "lang_code"],
          "ref": ["cscart_purchase_fl_com.cscart_payments.payment_id", "const"],
          "rows": 1,
          "filtered": 100,
          "attached_condition": "trigcond(cscart_payment_descriptions.lang_code = 'ja')"
        },
        "table": {
          "table_name": "cscart_payment_processors",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "3",
          "used_key_parts": ["processor_id"],
          "ref": ["cscart_purchase_fl_com.cscart_payments.processor_id"],
          "rows": 1,
          "filtered": 100
        },
        "table": {
          "table_name": "cscart_addons",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "98",
          "used_key_parts": ["addon"],
          "ref": ["cscart_purchase_fl_com.cscart_payment_processors.addon"],
          "rows": 1,
          "filtered": 100,
          "attached_condition": "trigcond(trigcond(cscart_payment_processors.addon is not null))"
        },
        "block-nl-join": {
          "table": {
            "table_name": "storefronts_payments",
            "access_type": "index",
            "key": "PRIMARY",
            "key_length": "8",
            "used_key_parts": ["storefront_id", "payment_id"],
            "rows": 19,
            "filtered": 100,
            "using_index": true
          },
          "buffer_type": "flat",
          "buffer_size": "90Kb",
          "join_type": "BNL",
          "attached_condition": "trigcond(storefronts_payments.storefront_id = 2 or storefronts_payments.storefront_id is null) and trigcond(storefronts_payments.payment_id = cscart_payments.payment_id)"
        }
      }
    }
  }
}

Result

payment_id company_id usergroup_ids position status template processor_id processor_params a_surcharge p_surcharge tax_ids localization payment_category payment description instructions surcharge_title lang_code processor_status processor_type processor_script
19 1 0 0 A addons/stripe/views/orders/components/payments/stripe.tpl 107 a:11:{s:9:"is_stripe";s:1:"Y";s:7:"is_test";s:1:"N";s:10:"webhook_id";s:27:"we_1MnBtHECW14fKOAwJ1f8TRGn";s:18:"webhook_secret_key";s:38:"whsec_EcfAXcZZtQVLnfuZkyIVczm08Owdn4Kd";s:15:"publishable_key";s:107:"pk_live_51It9yAECW14fKOAw25tXAPyfvIG14YIrcvx3LzmWeWLKwtAEJZAAlxwqjaj3VfI7jJ6VHuEZRGSFvNuustDcchjx00OS6CqNLN";s:10:"secret_key";s:107:"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";s:19:"merchant_identifier";s:0:"";s:7:"country";s:2:"JP";s:8:"currency";s:3:"JPY";s:12:"payment_type";s:15:"stripe_checkout";s:19:"show_payment_button";s:1:"N";} 0.000 0.000 tab1 クレジットカード、linkで支払う ja A P stripe.php
15 2 0 4 A addons/paypal/views/orders/components/payments/paypal_express.tpl 104 a:11:{s:8:"currency";s:3:"JPY";s:12:"order_prefix";s:0:"";s:10:"in_context";s:1:"Y";s:11:"merchant_id";s:13:"MBQ625EXJYL3G";s:8:"username";s:44:"hiroshi.uchimura_api1.resource-sharing.co.jp";s:8:"password";s:16:"6DSLJM3QJCSYTW3D";s:21:"authentication_method";s:9:"signature";s:9:"signature";s:56:"AwMsZdrR9L1Lf83UOm0hJov-jfiDAUzKNFZ9JKsK2BZiBmf8SODvnMB.";s:11:"send_adress";s:1:"Y";s:4:"mode";s:4:"live";s:16:"show_cart_button";s:1:"N";} 0.000 0.000 tab1 PayPal ja A B paypal_express.php
2 1 0 5 A views/orders/components/payments/phone.tpl 0 0.000 0.000 tab3 電話注文 ご注文用電話番号: 5555555 <p>この支払方法に関する指示を入力してください</p> ja A