UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'f5ZNfnYtm9BUFzh7/94/bLzlGSAioPmaE2QGmmUtPQI=' 
WHERE 
  key_id = '2abcf4e5c464d6b4f107a596dacebf2610b300ecdc3d4fc98f407da00b0e294f' 
  AND (
    token = 'f5ZNfnYtm9BUFzh7/94/bLzlGSAioPmaE2QGmmUtPQI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00068