UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qyp2Fe02Fo+T9lv2tdgpeEUk9uCLIFsgerOOd+Ci5Ps=' 
WHERE 
  key_id = 'bc95e1f7bd29aa8e347aaf9e75f0f4ed8c9aa2222871563c18c3c728e416c73b' 
  AND (
    token = 'qyp2Fe02Fo+T9lv2tdgpeEUk9uCLIFsgerOOd+Ci5Ps=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046