UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pvcuiIExLvhkjQ7gr4qL97umbYjbSM0hyft4LYUIWgg=' 
WHERE 
  key_id = '2e5525a0c24adbd73eb8251954b2d44262baf45eccc5bfdb623b6806a1b958a2' 
  AND (
    token = 'pvcuiIExLvhkjQ7gr4qL97umbYjbSM0hyft4LYUIWgg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029