UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'oqDoeEhYhmUHnBHHuS1f8HI8MrLdbKmIGoj6ecUTC7w=' 
WHERE 
  key_id = 'eb3cb6dc6381d39b8b1f6a6921cf4b9c25a2d94296285dc5cf97e1726261fb01' 
  AND (
    token = 'oqDoeEhYhmUHnBHHuS1f8HI8MrLdbKmIGoj6ecUTC7w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039