UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'sb3AAEJyoGdk04Ud2ZthiW/xIUECBHB3E4QHmqiFiGE=' 
WHERE 
  key_id = 'fca26234b53f858dedd6e9336a4c2cd32c4c9d2cd7cba29030407164260e05e9' 
  AND (
    token = 'sb3AAEJyoGdk04Ud2ZthiW/xIUECBHB3E4QHmqiFiGE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031