UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7k98OtRryMfcm9Bcs07q7n2qcU6vFR+jSyuT34DRWXo=' 
WHERE 
  key_id = '2b37bdf0a00278c26a69c38a3aafe733c6f677aff6d2c79f01c0ce8c2632afde' 
  AND (
    token = '7k98OtRryMfcm9Bcs07q7n2qcU6vFR+jSyuT34DRWXo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014