UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9c7bSvn7Fw1NZH/1EPCxKSyXBPWE0pl5JL+MAsUCQnI=' 
WHERE 
  key_id = 'fcbc82dc0fadb56208dc703ca00d7690c463a94a7999488c89ee9ea6e7958d94' 
  AND (
    token = '9c7bSvn7Fw1NZH/1EPCxKSyXBPWE0pl5JL+MAsUCQnI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034