UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FxJ1k0JZn+ur6RCkIX6EpsVrLeR7GshmuL1KcDk/oM8=' 
WHERE 
  key_id = 'de835cfd4683e15f23bc7e4f31dd855e47077000547c0aeec0dbafa7a7ba209e' 
  AND (
    token = 'FxJ1k0JZn+ur6RCkIX6EpsVrLeR7GshmuL1KcDk/oM8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031