UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Nf9pybscNEXN4DsCPETP/E7CzCZhHTWkTcrz7EqaFHY=' 
WHERE 
  key_id = 'bec7b48a330351e93229ef00b2a21eb9a405c0e7b23eaa138cd33a0e85627f34' 
  AND (
    token = 'Nf9pybscNEXN4DsCPETP/E7CzCZhHTWkTcrz7EqaFHY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047