UPDATE 
  cscart_aprillock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'WCBDG/nT23pPmO+9rKbjYRx9JSgxh389t6laGj+NPCo=' 
WHERE 
  key_id = '4ae4532d0d506ec1f3978a92b9e513c546926fb47df08ddfc0107870e1a5a794' 
  AND (
    token = 'WCBDG/nT23pPmO+9rKbjYRx9JSgxh389t6laGj+NPCo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036