UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'lSLIk+WhGOdYF1qv5rNk+ClC+XYmLPohjyZGCt/zKTE=' 
WHERE 
  key_id = '5519b0f6d37ad8629d6f0bd7f75488b1747e0b92d283813ed1f5b4952704900b' 
  AND (
    token = 'lSLIk+WhGOdYF1qv5rNk+ClC+XYmLPohjyZGCt/zKTE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040