SELECT 
  data, 
  expiry 
FROM 
  cscart_cache 
WHERE 
  name = 'scheme_block.cache_customer__1scheme_block_template' 
  AND company_id = 0 
  AND (
    expiry = 0 
    OR expiry > 1776164632
  )

Query time 0.00041

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_cache",
          "access_type": "const",
          "possible_keys": ["PRIMARY", "name", "company_id"],
          "key": "PRIMARY",
          "key_length": "771",
          "used_key_parts": ["name", "company_id"],
          "ref": ["const", "const"],
          "rows": 1,
          "filtered": 100
        }
      }
    ]
  }
}

Result

data expiry
a:8:{s:9:"templates";a:13:{s:31:"blocks/static_templates/404.tpl";a:1:{s:4:"name";s:3:"404";}s:37:"blocks/static_templates/auth_info.tpl";a:1:{s:4:"name";s:9:"auth_info";}s:37:"blocks/static_templates/copyright.tpl";a:1:{s:4:"name";s:14:"tmpl_copyright";}s:46:"blocks/static_templates/feature_comparison.tpl";a:1:{s:4:"name";s:18:"feature_comparison";}s:32:"blocks/static_templates/logo.tpl";a:2:{s:4:"name";s:9:"tmpl_logo";s:8:"settings";a:1:{s:11:"enable_link";a:2:{s:4:"type";s:8:"checkbox";s:13:"default_value";s:1:"Y";}}}s:44:"blocks/static_templates/my_account_links.tpl";a:1:{s:4:"name";s:16:"my_account_links";}s:41:"blocks/static_templates/payment_icons.tpl";a:1:{s:4:"name";s:18:"tmpl_payment_icons";}s:40:"blocks/static_templates/profile_info.tpl";a:1:{s:4:"name";s:12:"profile_info";}s:39:"blocks/static_templates/quick_links.tpl";a:1:{s:4:"name";s:16:"tmpl_quick_links";}s:34:"blocks/static_templates/search.tpl";a:1:{s:4:"name";s:11:"tmpl_search";}s:47:"blocks/static_templates/shipping_estimation.tpl";a:1:{s:4:"name";s:19:"shipping_estimation";}s:56:"addons/newsletters/blocks/static_templates/subscribe.tpl";a:1:{s:4:"name";s:17:"tmpl_subscription";}s:65:"addons/newsletters/blocks/static_templates/subscribe_advanced.tpl";a:1:{s:4:"name";s:38:"tmpl_newsletters_subscription_advanced";}}s:8:"wrappers";a:6:{s:34:"blocks/wrappers/footer_general.tpl";a:1:{s:4:"name";s:14:"footer_general";}s:35:"blocks/wrappers/mainbox_general.tpl";a:1:{s:4:"name";s:15:"mainbox_general";}s:34:"blocks/wrappers/mainbox_simple.tpl";a:1:{s:4:"name";s:14:"mainbox_simple";}s:36:"blocks/wrappers/onclick_dropdown.tpl";a:1:{s:4:"name";s:16:"onclick_dropdown";}s:35:"blocks/wrappers/sidebox_general.tpl";a:1:{s:4:"name";s:15:"sidebox_general";}s:37:"blocks/wrappers/sidebox_important.tpl";a:1:{s:4:"name";s:17:"sidebox_important";}}s:5:"cache";b:0;s:19:"brief_info_function";s:26:"fn_block_get_template_info";s:13:"is_managed_by";a:1:{i:0;s:4:"ROOT";}s:4:"type";s:8:"template";s:7:"content";a:0:{}s:13:"is_manageable";b:1;} 0