UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'OAq+RLUXjL+HTM/p6EPs+Odbeo9OMdDTz01wOKTC1lI=' 
WHERE 
  key_id = 'f3a13571fa5346cde9c01cfe5815d1ab2524a74fe0500d8241615dcf0ca8143f' 
  AND (
    token = 'OAq+RLUXjL+HTM/p6EPs+Odbeo9OMdDTz01wOKTC1lI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035